<?php


namespace app\api\controller\v1;


use app\api\model\Banner;
use app\api\validate\IDMustBePostivelnt;
use app\lib\exception\BannenrException;

class BannerController{

    public function getBanner($id){
        $validate = new IDMustBePostivelnt();
        $validate->goCheck();
        $bannerModel = new Banner();
        $list = $bannerModel::getBanner($id);
        if(!$list){
            throw new BannenrException();
        }
        return json($list);
    }








}